-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lowercase the doctype #111
base: master
Are you sure you want to change the base?
Conversation
This change adds an unnecessary newline. |
Fixed, thank you |
It is still there. |
Sorry, fixed again using file upload |
Requesting review again, please |
<!doctype html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can even remove the space.
<!doctype html> | |
<!doctypehtml> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whitespace is required
Source:
https://html.spec.whatwg.org/multipage/syntax.html#the-doctype
A DOCTYPE must consist of the following components, in this order:
- A string that is an ASCII case-insensitive match for the string "<!DOCTYPE".
- One or more ASCII whitespace. ⭐
- A string that is an ASCII case-insensitive match for the string "html".
- Optionally, a DOCTYPE legacy string.
- Zero or more ASCII whitespace.
- A U+003E GREATER-THAN SIGN character (>).
e0d540b
to
735df1a
Compare
Replace every DOCTYPE to doctype.
Best practice identified at https://stackoverflow.com/questions/7020961/uppercase-or-lowercase-doctype#comment71796606_7020961
The achieves not only being the same size as the existing file in the repository, but, because of GZIP compression, this is likely to be smaller when sent across the network wire, up to possibly a FULL BYTE!